package com.mytestapp.wxapi

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeHost
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.modules.core.DeviceEventManagerModule

class WXEntryActivity : Activity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        
        val params: WritableMap = Arguments.createMap()
        // 添加你的参数到params
        
        (application as? ReactApplication)?.reactNativeHost
            ?.reactInstanceManager
            ?.currentReactContext
            ?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
            ?.emit("WeChat_Resp", params)
        
        finish()
    }
}